/**
 * Copyright &copy; 2016 splat  All rights reserved.
 */
package com.contractpage.ec.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.contractpage.common.persistence.Page;
import com.contractpage.ec.dao.DictDao;
import com.contractpage.ec.entity.Dict;
import com.contractpage.ec.service.DictService;
/**
 * 字典Service
 * @author splat
 * @version 2014-05-16
 */
@Transactional
@Service
public class DictServiceImpl implements DictService {
	@Autowired
	private DictDao dictDao;
	
	@Override
	public Page<Dict> findList(Page<Dict> page,Dict entity){
		entity.setPage(page);
		page.setList(dictDao.findList(entity));
		return page;
	}
	@Override
	public int insert(Dict entity){
		entity.preInsert("");
		return dictDao.insert(entity);
	}
	@Override
	public int update(Dict entity){
		entity.preUpdate();
		return dictDao.update(entity);
	}
	@Override
	public int delete(Dict entity){
		 return dictDao.delete(entity);
	}
	@Override
	public List<Dict> findAllList() {
		return dictDao.findList(new Dict());
	}
}
